package model_;

public class Person {
	private String name, iD, yearEnroled, gender,
	/* profilePic, */
	dateOfBirth, adress, homepage, EMail, telephoneN;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the iD
	 */
	public String getiD() {
		return iD;
	}

	/**
	 * @param iD
	 *            the iD to set
	 */
	public void setiD(String iD) {
		this.iD = iD;
	}

	/**
	 * @return the yearEnroled
	 */
	public String getYearEnroled() {
		return yearEnroled;
	}

	/**
	 * @param yearEnroled
	 *            the yearEnroled to set
	 */
	public void setYearEnroled(String yearEnroled) {
		this.yearEnroled = yearEnroled;
	}

	/**
	 * @return the gender
	 */
	public String getGender() {
		return gender;
	}

	/**
	 * @param gender
	 *            the gender to set
	 */
	public void setGender(String gender) {
		this.gender = gender;
	}

	/**
	 * @return the profilePic
	 */
	/*
	 * public String getProfilePic() { return profilePic; } /* /**
	 * 
	 * @param profilePic the profilePic to set
	 */
	/*
	 * public void setProfilePic(String profilePic) { this.profilePic =
	 * profilePic; }
	 */
	/**
	 * @return the dateOfBirth
	 */
	public String getDateOfBirth() {
		return dateOfBirth;
	}

	/**
	 * @param dateOfBirth
	 *            the dateOfBirth to set
	 */
	public void setDateOfBirth(String dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}

	/**
	 * @return the adress
	 */
	public String getAdress() {
		return adress;
	}

	/**
	 * @param adress
	 *            the adress to set
	 */
	public void setAdress(String adress) {
		this.adress = adress;
	}

	/**
	 * @return the homepage
	 */
	public String getHomepage() {
		return homepage;
	}

	/**
	 * @param homepage
	 *            the homepage to set
	 */
	public void setHomepage(String homepage) {
		this.homepage = homepage;
	}

	public String getEMail() {
		return EMail;
	}

	public void setEMail(String eMail) {
		EMail = eMail;
	}

	public String getTelephoneN() {
		return telephoneN;
	}

	public void setTelephoneN(String telephoneN) {
		this.telephoneN = telephoneN;
	}

	public static void setPerson(Person p, String s) {
		if (s == "prof") {
			p = new Professor();
		} else if (s == "admin") {
			p = new Administrative();
		} else if (s == "stud") {
			p = new Student();
		} else if (s == "assis") {
			p = new Assistant();
		} else {
			String.format("%s", "error");
		}
	}

	public String toString(Person a) {
		String s = "the name of the person is\t%s\nid\t%s\n"
				+ "adress\t%s\ndate of birth\t%s\ngender\t%s\n"
				+ "year enrolled\t%s\nE-mail\t%s\n" + "telephone\t";
		String string = String.format(s, a.getName(), a.getiD(), a.getAdress(),
				a.getDateOfBirth(), a.getGender(), a.getYearEnroled(),
				a.getEMail(), a.getTelephoneN(), a.getHomepage());
		return string;
	}

}
